package com.xbh.boot_study.srv.impl;

import com.xbh.boot_study.srv.LoginSrv;
import com.xbh.boot_study.util.ResponseData;
import org.springframework.stereotype.Service;

import javax.jws.WebService;

/**
 * @LoginSrvImpl: login impl
 * @author: ZBoHang
 * @time: 2022/3/16 9:42
 */
@Service
@WebService(serviceName = "LoginSrv", // 同接口
        targetNamespace = "http://my-wsdl.com", // 同接口
        endpointInterface = "com.xbh.boot_study.srv.LoginSrv") // 接口权限命名
public class LoginSrvImpl implements LoginSrv {

    @Override
    public ResponseData login(String userName, String userPass) {

        if ("root".equals(userName) && "123456".equals(userPass)) {

            return ResponseData.success();
        }
        return ResponseData.failure();
    }
}
